package com.module.login.view;


import android.content.Intent;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.module.app.arouter.service.ILauncherService;
import com.module.app.base.BaseActivity;
import com.module.login.R;

public class LoginActivity extends BaseActivity {

    @Autowired
    ILauncherService mLauncherService;

    @Override
    public void bingViewModel() {

    }
    @Override
    protected int getLayoutId() {
        return R.layout.login_activity_home;
    }

    @Override
    protected void initView() {
        super.initView();
        setTitle(R.string.login_title);

        findViewById(R.id.tv_go_home).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                onClickBtn();
            }
        });
    }

    public void onClickBtn(){
        if (mLauncherService != null){
            mLauncherService.startMain(LoginActivity.this);
        } else {
            startActivity(new Intent(LoginActivity.this, MainActivity.class));
        }
    }
}
